<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head id="Head">

<title>
	在SpringSide 3 中使用多个数据库的方法 - 海边沫沫 - BlogJava
</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta id="metaKeywords" name="keywords" content="在SpringSide 3 中使用多个数据库的方法"><link id="MainCss" type="text/css" rel="stylesheet" href="286916_files/style.css"><link id="RSSLink" title="RSS" type="application/rss+xml" rel="alternate" href="http://www.blogjava.net/youxia/rss.aspx"></head><body>
    <form name="Form1" method="post" action="286916.html" onsubmit="javascript:return WebForm_OnSubmit();" id="Form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="286916_files/WebResource.js" type="text/javascript"></script>

<script language="JavaScript">
									function ctlent(evt,id)
											{
												if(evt.ctrlKey && evt.keyCode == 13)
												{	
													try
													{
														TempSave(id);
													}
													catch(ex)
													{
													}
													finally
													{
													    __doPostBack('AjaxHolder$PostComment$btnSubmit','')
													}
												}
		
												}</script>
												<script language="JavaScript">function SetReplyAuhor(author){document.getElementById('AjaxHolder_PostComment_tbComment').value+="@"+author+"\n";document.getElementById('AjaxHolder_PostComment_tbComment').focus();return false}</script>
<script src="286916_files/ScriptResource_002.js" type="text/javascript"></script>
<script src="286916_files/ScriptResource_003.js" type="text/javascript"></script>
<script src="286916_files/ScriptResource.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</script>

        


<table class="Framework" width="100%" cellpadding="0" cellspacing="0">
	<tbody><tr>
		<td colspan="3">
			
<div id="top">
<table cellpadding="10" cellspacing="0">
	<tbody><tr>
		<td nowrap="nowrap">
			<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.blogjava.net/youxia/">海边沫沫</a></h1>
			相濡以沫，不如相忘于江湖
<style type="text/css">
.postbody {
  Font-Size:16px;FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;PADDING-RIGHT: 1.5em; PADDING-LEFT: 1.5em; PADDING-BOTTOM: 2em; PADDING-TOP: 1em;WORD-WRAP: break-word
}
.posthead {
	PADDING-RIGHT: 4px; BACKGROUND-POSITION: 5px center; PADDING-LEFT: 25px; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(images/icon-titledoc.gif); PADDING-BOTTOM: 4px; COLOR: #444444; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-REPEAT: no-repeat; BACKGROUND-COLOR: #eeeeee
}
.posthead H2 {
	FONT-SIZE: 16px; MARGIN: 0px
}</style>
		</td>
	</tr>
</tbody></table>
</div>
<div id="sub">
	<div id="sub-right">
<div class="BlogStats">posts - 59, comments - 699, trackbacks - 0, articles - 0</div></div>
	
&nbsp;
<a id="Header1_MyLinks1_HomeLink" href="http://www.blogjava.net/">BlogJava</a>&nbsp;::
<a id="Header1_MyLinks1_MyHomeLink" href="http://www.blogjava.net/youxia/">首页</a>&nbsp;::
<a id="Header1_MyLinks1_NewPostLink" href="http://www.blogjava.net/youxia/admin/EditPosts.aspx?opt=1">新随笔</a>&nbsp;::
<a id="Header1_MyLinks1_ContactLink" accesskey="9" href="http://www.blogjava.net/youxia/contact.aspx?id=1">联系</a>&nbsp;::
<a id="Header1_MyLinks1_Syndication" href="http://www.blogjava.net/youxia/rss">聚合</a>
<a id="Header1_MyLinks1_XMLLink" class="XMLLink" href="http://www.blogjava.net/youxia/rss"><img src="286916_files/xml.gif" style="border-width: 0px;"></a>&nbsp;::
<a id="Header1_MyLinks1_Admin" href="http://www.blogjava.net/youxia/admin/EditPosts.aspx">管理</a>

</div>
		</td>
	</tr>
	<tr>
		<td class="LeftCell">
			<div id="leftmenu">
	
		
<div id="Cal">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>日历</h3>
<table id="Calendar1_entryCal" title="Calendar" style="border-width: 0px; color: Black; background-color: rgb(238, 238, 221); font-family: Verdana; height: 180px; width: 178px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr><td colspan="7" style="background-color: rgb(238, 238, 238);"><table style="color: rgb(102, 102, 102); font-family: Verdana; font-size: 13px; font-weight: bold; width: 100%; border-collapse: collapse;" border="0" cellspacing="0">
		<tbody><tr><td style="width: 15%;" valign="bottom"><a href="javascript:__doPostBack('Calendar1$entryCal','V3439')" style="color: Black;" title="Go to the previous month">&lt;</a></td><td style="width: 70%;" align="center">2009年7月</td><td style="width: 15%;" valign="bottom" align="right"><a href="javascript:__doPostBack('Calendar1$entryCal','V3500')" style="color: Black;" title="Go to the next month">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th abbr="日" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">日</th><th abbr="一" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">一</th><th abbr="二" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">二</th><th abbr="三" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">三</th><th abbr="四" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">四</th><th abbr="五" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">五</th><th abbr="六" scope="col" style="background-color: rgb(221, 221, 204); font-size: 12px;" align="center">六</th></tr><tr><td style="color: Gray; font-size: 11px; width: 14%;" align="center">28</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">29</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">30</td><td style="font-size: 11px; width: 14%;" align="center">1</td><td style="font-size: 11px; width: 14%;" align="center">2</td><td style="font-size: 11px; width: 14%;" align="center">3</td><td style="font-size: 11px; width: 14%;" align="center">4</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">5</td><td style="font-size: 11px; width: 14%;" align="center">6</td><td style="font-size: 11px; width: 14%;" align="center">7</td><td style="font-size: 11px; width: 14%;" align="center">8</td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.blogjava.net/youxia/archive/2009/07/09.html"><u>9</u></a></td><td style="font-size: 11px; width: 14%;" align="center">10</td><td style="font-size: 11px; width: 14%;" align="center">11</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.blogjava.net/youxia/archive/2009/07/12.html"><u>12</u></a></td><td style="font-size: 11px; width: 14%;" align="center">13</td><td style="font-size: 11px; width: 14%;" align="center">14</td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.blogjava.net/youxia/archive/2009/07/15.html"><u>15</u></a></td><td style="font-size: 11px; width: 14%;" align="center">16</td><td style="font-size: 11px; width: 14%;" align="center">17</td><td style="font-size: 11px; width: 14%;" align="center">18</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.blogjava.net/youxia/archive/2009/07/19.html"><u>19</u></a></td><td style="font-size: 11px; width: 14%;" align="center">20</td><td style="font-size: 11px; width: 14%;" align="center">21</td><td style="font-size: 11px; width: 14%;" align="center"><a href="http://www.blogjava.net/youxia/archive/2009/07/22.html"><u>22</u></a></td><td style="font-size: 11px; width: 14%;" align="center">23</td><td style="font-size: 11px; width: 14%;" align="center">24</td><td style="font-size: 11px; width: 14%;" align="center">25</td></tr><tr><td style="font-size: 11px; width: 14%;" align="center">26</td><td style="font-size: 11px; width: 14%;" align="center">27</td><td style="font-size: 11px; width: 14%;" align="center">28</td><td style="font-size: 11px; width: 14%;" align="center">29</td><td style="font-size: 11px; width: 14%;" align="center">30</td><td style="font-size: 11px; width: 14%;" align="center">31</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">1</td></tr><tr><td style="color: Gray; font-size: 11px; width: 14%;" align="center">2</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">3</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">4</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">5</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">6</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">7</td><td style="color: Gray; font-size: 11px; width: 14%;" align="center">8</td></tr>
</tbody></table>
</div>

		
	
	
	
<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5">
<h3>常用链接</h3>
<ul>
		<li><a id="Singlecolumn2_ctl00_repeaterLinks_ctl01_lnkLinkItem" href="http://www.blogjava.net/youxia/MyPosts.html">我的随笔</a></li>
	
		<li><a id="Singlecolumn2_ctl00_repeaterLinks_ctl02_lnkLinkItem" href="http://www.blogjava.net/youxia/MyComments.html">我的评论</a></li>
	
		<li><a id="Singlecolumn2_ctl00_repeaterLinks_ctl03_lnkLinkItem" href="http://www.blogjava.net/youxia/OtherPosts.html">我的参与</a></li>
	
		<li><a id="Singlecolumn2_ctl00_repeaterLinks_ctl04_lnkLinkItem" href="http://www.blogjava.net/youxia/RecentComments.html">最新评论</a></li>
	</ul>
</div>
<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>留言簿<span style="font-size: 11px; font-weight: normal;">(44)</span></h3>
<ul>
	<li>
		<a id="Singlecolumn2__7400b9f9d62_lnkMessages" href="http://www.blogjava.net/youxia/Contact.aspx?id=1">给我留言</a>
	</li><li>
		<a id="Singlecolumn2__7400b9f9d62_lnkPublicMsgView" href="http://www.blogjava.net/youxia/default.aspx?opt=msg">查看公开留言</a>
	</li><li>
		<a id="Singlecolumn2__7400b9f9d62_lnkPrivateMsgView" href="http://www.blogjava.net/youxia/admin/MyMessages.aspx">查看私人留言</a>
	</li>
</ul>
</div>

		<div id="cell">
		<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>随笔分类</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to J2EE学习及探索(8)" href="http://www.blogjava.net/youxia/category/15244.html/rss"><img title="Subscribe to J2EE学习及探索(8)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.blogjava.net/youxia/category/15244.html">J2EE学习及探索(8)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl02_RssLink" title="Subscribe to Linux和Java(11)" href="http://www.blogjava.net/youxia/category/25550.html/rss"><img title="Subscribe to Linux和Java(11)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl02_Link" href="http://www.blogjava.net/youxia/category/25550.html">Linux和Java(11)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl03_RssLink" title="Subscribe to NetBeans与J2ME(6)" href="http://www.blogjava.net/youxia/category/24148.html/rss"><img title="Subscribe to NetBeans与J2ME(6)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl03_Link" href="http://www.blogjava.net/youxia/category/24148.html">NetBeans与J2ME(6)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl04_RssLink" title="Subscribe to SpringSide开发实战(25)" href="http://www.blogjava.net/youxia/category/18616.html/rss"><img title="Subscribe to SpringSide开发实战(25)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl04_Link" href="http://www.blogjava.net/youxia/category/18616.html">SpringSide开发实战(25)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl05_RssLink" title="Subscribe to SVN与源代码管理(3)" href="http://www.blogjava.net/youxia/category/26691.html/rss"><img title="Subscribe to SVN与源代码管理(3)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl05_Link" href="http://www.blogjava.net/youxia/category/26691.html">SVN与源代码管理(3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl06_RssLink" title="Subscribe to 拥抱Eclipse RCP(7)" href="http://www.blogjava.net/youxia/category/17374.html/rss"><img title="Subscribe to 拥抱Eclipse RCP(7)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl00_LinkList_ctl06_Link" href="http://www.blogjava.net/youxia/category/17374.html">拥抱Eclipse RCP(7)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>随笔档案</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.blogjava.net/youxia/archive/2009/08.html">2009年8月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.blogjava.net/youxia/archive/2009/07.html">2009年7月 (6)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.blogjava.net/youxia/archive/2009/05.html">2009年5月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl04_Link" href="http://www.blogjava.net/youxia/archive/2009/04.html">2009年4月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl05_Link" href="http://www.blogjava.net/youxia/archive/2009/03.html">2009年3月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl06_Link" href="http://www.blogjava.net/youxia/archive/2008/12.html">2008年12月 (4)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl07_Link" href="http://www.blogjava.net/youxia/archive/2008/11.html">2008年11月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl08_Link" href="http://www.blogjava.net/youxia/archive/2008/03.html">2008年3月 (2)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl09_Link" href="http://www.blogjava.net/youxia/archive/2008/02.html">2008年2月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl10_Link" href="http://www.blogjava.net/youxia/archive/2008/01.html">2008年1月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl11_Link" href="http://www.blogjava.net/youxia/archive/2007/12.html">2007年12月 (1)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl12_Link" href="http://www.blogjava.net/youxia/archive/2007/10.html">2007年10月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl13_Link" href="http://www.blogjava.net/youxia/archive/2007/09.html">2007年9月 (8)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl14_Link" href="http://www.blogjava.net/youxia/archive/2007/08.html">2007年8月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl15_Link" href="http://www.blogjava.net/youxia/archive/2007/07.html">2007年7月 (2)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl16_Link" href="http://www.blogjava.net/youxia/archive/2007/03.html">2007年3月 (3)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl17_Link" href="http://www.blogjava.net/youxia/archive/2007/01.html">2007年1月 (2)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl18_Link" href="http://www.blogjava.net/youxia/archive/2006/12.html">2006年12月 (5)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl19_Link" href="http://www.blogjava.net/youxia/archive/2006/11.html">2006年11月 (4)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl20_Link" href="http://www.blogjava.net/youxia/archive/2006/10.html">2006年10月 (2)</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl01_LinkList_ctl21_Link" href="http://www.blogjava.net/youxia/archive/2006/09.html">2006年9月 (1)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>收藏夹</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_RssLink" title="Subscribe to 我常用的技术资料(6)" href="http://www.blogjava.net/youxia/favorite/16383.html/rss"><img title="Subscribe to 我常用的技术资料(6)" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl02_LinkList_ctl01_Link" href="http://www.blogjava.net/youxia/favorite/16383.html">我常用的技术资料(6)</a>
				</li>
			
				</ul>
			</div>
	
		<div id="cell">
		<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>我的博客系列</h3>
		
				<ul>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl01_RssLink" title="Subscribe to 我的 .net 博客" href="http://www.cnblogs.com/youxia/rss"><img title="Subscribe to 我的 .net 博客" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl01_Link" href="http://www.cnblogs.com/youxia" target="_blank">我的 .net 博客</a>
				</li>
			
				<li><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl02_RssLink" title="Subscribe to 我的 c++ 博客" href="http://www.cppblog.com/youxia/rss"><img title="Subscribe to 我的 c++ 博客" src="286916_files/xmlsmall.gif" style="border-width: 0px;"></a><a id="Singlecolumn2_Categories_CatList_ctl03_LinkList_ctl02_Link" href="http://www.cppblog.com/youxia" target="_blank">我的 c++ 博客</a>
				</li>
			
				</ul>
			</div>
	

<script language="JavaScript">
function SearchGoogle(key,evt,site)
		{
			if(evt.keyCode==13 || evt.keyCode==0)
			{
				key.focus();
				var keystr = encodeURIComponent(key.value);
				url = "http://www.google.com/search?q=";
				url = url+keystr;
				url += "&ie=UTF-8&oe=GB2312&hl=zh-CN&domains="+site+"&sitesearch="+site;
				window.location = url;
				return false;			
			}
			
		}
</script>
<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>搜索</h3>
<ul>
	<li><input style="width: 130px;" name="q" id="q" onkeydown="return SearchGoogle(document.getElementById('q'),event,'http://www.blogjava.net/youxia/')" type="text">&nbsp;<input onclick="SearchGoogle(document.getElementById('q'),event,'http://www.blogjava.net/youxia/')" value="搜索" name="sa" type="button"></li></ul>
</div>
<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>积分与排名</h3>
<ul>
	<li>
		积分 -
		256697
	</li><li>
		排名 -
		37
	</li>
</ul>
</div>

<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>最新评论
	<a id="Singlecolumn2__3b8aaf8868be_RSSHyperlink1" href="http://www.blogjava.net/youxia/CommentsRSS.aspx"><img src="286916_files/xml.gif" style="border-width: 0px;"></a></h3>
<div class="RecentComment">
	
			<ul>
		
			<li style="">
				<a id="Singlecolumn2__3b8aaf8868be_CommentList_ctl01_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/10/19/287366.html#298892">1.&nbsp;re: 使用SpringSide 3.1.4.3开发Web项目的全过程（上）</a>
			</li>
			<li style="">
				现在3.1.8版上不采用EntityService了。
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--yangjiandong</li>
		
			<li style="">
				<a id="Singlecolumn2__3b8aaf8868be_CommentList_ctl02_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/10/13/104077.html#298080">2.&nbsp;re: SpringSide开发实战（七）：在项目中整合FCKeditor</a>
			</li>
			<li style="">
				站长 这个编辑器 2.3 跟 2.4 之间有个问题，2.3 选择字体，鼠标点击不会还原上一个字体，但是 2.4选择字体后，鼠标点击时会还原上一个字体。这是配置问题，还是代码问题？
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--星期五</li>
		
			<li style="">
				<a id="Singlecolumn2__3b8aaf8868be_CommentList_ctl03_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/10/10/86513.html#297647">3.&nbsp;re: 使用Eclipse RCP进行桌面程序开发（六）：向OpenGL进军</a>
			</li>
			<li style="">
				写的很详细 
<br>原理解释的也很清楚 
<br>致敬！
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--jock</li>
		
			<li style="">
				<a id="Singlecolumn2__3b8aaf8868be_CommentList_ctl04_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/10/08/287366.html#297423">4.&nbsp;re: 使用SpringSide 3.1.4.3开发Web项目的全过程（上）</a>
			</li>
			<li style="">
				博主有没有遇到springside在搜索框输入中文会出现乱码的情况啊？怎么解决呢？谢谢。
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--mcdull</li>
		
			<li style="">
				<a id="Singlecolumn2__3b8aaf8868be_CommentList_ctl05_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/09/21/292421.html#295904">5.&nbsp;re: 在SpringSide 3 中使用JCaptcha[未登录]</a>
			</li>
			<li style="">
				与楼主心有灵犀，谢谢分享。
			</li>
			<li style="text-align: right; margin-right: 4px;">
				--笨笨</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>阅读排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__43b4cd4a4eb0_TopList_ctl01_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/11/17/81852.html">1.&nbsp;使用Eclipse RCP进行桌面程序开发（一）：快速起步(20401)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__43b4cd4a4eb0_TopList_ctl02_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/11/24/83377.html">2.&nbsp;使用Eclipse RCP进行桌面程序开发（三）：视图和透视图(13323)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__43b4cd4a4eb0_TopList_ctl03_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/11/20/82388.html">3.&nbsp;使用Eclipse RCP进行桌面程序开发（二）：菜单、工具栏和对话框(12791)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__43b4cd4a4eb0_TopList_ctl04_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2007/03/15/104077.html">4.&nbsp;SpringSide开发实战（七）：在项目中整合FCKeditor(8346)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__43b4cd4a4eb0_TopList_ctl05_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/12/21/89365.html">5.&nbsp;SpringSide开发实战（一）：使用Eclipse让SpringSide跑起来(8306)</a>
			</li>
		
			</ul>
		
</div>
</div>

<div id="cell">
<img src="286916_files/icon-group.jpg" vspace="2" align="left" hspace="5"><h3>评论排行榜</h3>
<div class="RecentComment">
	
			<ul style="">
		
			<li>
				<a id="Singlecolumn2__2e0c2e859d3c_TopList_ctl01_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2007/03/15/104077.html">1.&nbsp;SpringSide开发实战（七）：在项目中整合FCKeditor(40)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__2e0c2e859d3c_TopList_ctl02_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/11/17/81852.html">2.&nbsp;使用Eclipse RCP进行桌面程序开发（一）：快速起步(40)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__2e0c2e859d3c_TopList_ctl03_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/11/24/83377.html">3.&nbsp;使用Eclipse RCP进行桌面程序开发（三）：视图和透视图(31)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__2e0c2e859d3c_TopList_ctl04_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2006/10/20/76414.html">4.&nbsp;建立一个网站需要多少启动资金？(30)</a>
			</li>
		
			<li>
				<a id="Singlecolumn2__2e0c2e859d3c_TopList_ctl05_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2008/01/16/175753.html">5.&nbsp;再谈创业之路（高并发高负载的网站架构）(27)</a>
			</li>
		
			</ul>
		
</div>
</div>

</div>
		</td>
		<td class="MainCell">
			<div id="main">
				
					
	<div class="post">
		<div class="posthead">
			<h2>
				<a id="viewpost1_TitleUrl" class="singleposttitle" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html">在SpringSide 3 中使用多个数据库的方法</a>
			</h2>
 			Posted on 2009-07-15 21:25 <a href="http://www.blogjava.net/youxia/">海边沫沫</a> 阅读(1965) <a href="#Post">评论(10)</a> &nbsp;<a href="http://www.blogjava.net/youxia/admin/EditPosts.aspx?postid=286916">编辑</a> &nbsp;<a href="http://www.blogjava.net/youxia/AddToFavorite.aspx?id=286916">收藏</a>  所属分类: <a href="http://www.blogjava.net/youxia/category/18616.html">SpringSide开发实战</a> 
			<img src="286916_files/286916.jpeg" width="1" height="1">
			
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html"
dc:identifier="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html"
dc:title="在SpringSide 3 中使用多个数据库的方法"
trackback:ping="http://www.blogjava.net/youxia/services/trackbacks/286916.aspx" />
</rdf:RDF>
-->

		</div>
		<div class="postbody">在SpringSide
3社区中，不断有人提出多数据源配置的问题，但是时至今日却一直没有一个完美的答案。经过一个星期的折腾，我总算搞清楚了在SpringSide
3中配置多数据源的各种困难并加以解决，在这里，特地把我配置SpringSide 3项目中多数据源的过程写出来，与大家分享。<br>
<br>
我使用的SpringSide的版本是江南白衣最新发布的3.1.4翻墙版，在上一篇博文中，记录了我折腾的全过程，感兴趣的朋友可以看看：<br>
<a href="http://www.blogjava.net/youxia/archive/2009/07/12/286454.html">http://www.blogjava.net/youxia/archive/2009/07/12/286454.html</a><br>
<br>
下面进入正题：<br>
<br>
结论：在基于SpringSide
3的项目中，如果要使用多个数据库，首先要配置多个数据源，然后配置多个SessionFactory，这本身没有问题，但是一涉及到事务，问题就来了，
在多数据源的环境下，必须使用JTATransactionManager，而使用JTATransactionManager，就必须得有提供JTA功
能的应用服务器或提供JTA功能的别的什么组件。<br>
<br>
以上结论绝对正确，是属于SpringSide 3中关于使用多个数据库的最权威解答，下面来看具体过程：<br>
<br>
方法一、使用GlassFish应用服务器<br>
<br>
1、准备GlassFish服务器，下载地址为<a href="http://download.java.net/glassfish/v3/promoted/">http://download.java.net/glassfish/v3/promoted/</a>，
我选择的是08-Jul-2009
17:20发布的大小为72M的latest-glassfish.zip，这里需要强调的一点是千万不要选择latest-glassfish-
windows.exe这个版本，因为这个版本在Windows环境中只安装GlassFish而不提供合理的初始化配置，对于新手来说使用门槛太高，而
ZIP版一解压缩就可以使用，其服务器是配置好了的；<br>
<br>
2、在GlassFish中配置多个数据源，启动GlassFish后，访问4848端口就可以进入到GlassFish的管理界面，在其中配置两个数据
源，其资源名称分别为jdbc/dataSourceContent和jdbc/dataSourceIndex，如下图：<br>
<img alt="" src="286916_files/001.PNG" border="0"><br>
<br>
3、在项目中配置多个DataSource和多个SessionFactory，并选择JTATransactionManager作为事务管理器，这里
的DataSource是使用JNDI查找从应用服务器中获得的。下面是我项目中的applicationContext.xml文件：
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><img alt="" src="286916_files/None.gif" align="top"><span style="color: rgb(0, 0, 255);">&lt;?</span><span style="color: rgb(255, 0, 255);">xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"></span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">beans&nbsp;</span><span style="color: rgb(255, 0, 0);">xmlns</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;xmlns:jee</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/jee"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns:tx</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/tx"</span><span style="color: rgb(255, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;xmlns:context</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/context"</span><span style="color: rgb(255, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans&nbsp;http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&nbsp;http://www.springframework.org/schema/tx&nbsp;http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&nbsp;http://www.springframework.org/schema/jee&nbsp;http://www.springframework.org/schema/jee/spring-jee-2.5.xsd&nbsp;http://www.springframework.org/schema/context&nbsp;http://www.springframework.org/schema/context/spring-context-2.5.xsd"</span><span style="color: rgb(255, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;default-lazy-init</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">description</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">Spring公共配置文件&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">description</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;定义受环境影响易变的变量&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="systemPropertiesModeName"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="SYSTEM_PROPERTIES_MODE_OVERRIDE"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="ignoreResourceNotFound"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="locations"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">list</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;标准配置&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">classpath*:/application.properties</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">list</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;使用annotation&nbsp;自动注册bean,并保证@Required,@Autowired的属性被注入&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">context:component-scan&nbsp;</span><span style="color: rgb(255, 0, 0);">base-package</span><span style="color: rgb(0, 0, 255);">="cn.puretext"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;数据源配置,使用应用服务器的数据库连接池&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">jee:jndi-lookup&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;jndi-name</span><span style="color: rgb(0, 0, 255);">="jdbc/dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">jee:jndi-lookup&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;jndi-name</span><span style="color: rgb(0, 0, 255);">="jdbc/dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Hibernate配置&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="sessionFactoryContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="dataSource"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="namingStrategy"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.hibernate.cfg.ImprovedNamingStrategy"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="hibernateProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.dialect"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.dialect.MySQL5InnoDBDialect</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.show_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.show_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.format_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.format_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_class"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.cache.EhCacheProvider<br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_configuration_file_resource_path"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.ehcache_config_file}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="packagesToScan"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="cn.puretext.entity.*"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="sessionFactoryIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="dataSource"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="namingStrategy"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.hibernate.cfg.ImprovedNamingStrategy"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="hibernateProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.dialect"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.dialect.MySQL5InnoDBDialect</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.show_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.show_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.format_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.format_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_class"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.cache.EhCacheProvider<br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_configuration_file_resource_path"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.ehcache_config_file}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="packagesToScan"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="cn.puretext.entity.*"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;事务管理器配置,多数据源JTA事务</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="transactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.transaction.jta.JtaTransactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;使用annotation定义事务&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">tx:annotation-driven&nbsp;</span><span style="color: rgb(255, 0, 0);">transaction-manager</span><span style="color: rgb(0, 0, 255);">="transactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<img alt="" src="286916_files/None.gif" align="top">&nbsp;<br>
<img alt="" src="286916_files/None.gif" align="top"></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">beans</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
<br>
4、由于配置了多个SessionFactory，所以需要在web.xml中配置两个OpenSessionInViewFilter，下面是我的web.xml文件：
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><span style="color: rgb(0, 0, 255);">&lt;?</span><span style="color: rgb(255, 0, 255);">xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br>
</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">web-app&nbsp;</span><span style="color: rgb(255, 0, 0);">version</span><span style="color: rgb(0, 0, 255);">="2.4"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/j2ee"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/j2ee&nbsp;http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">PureText</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">display-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Spring&nbsp;ApplicationContext配置文件的路径,可使用通配符,多个路径用,号分隔<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;此参数用于后面的Spring&nbsp;Context&nbsp;Loader&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">context-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">contextConfigLocation</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">classpath*:/applicationContext*.xml</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">context-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Character&nbsp;Encoding&nbsp;filter&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">encodingFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springframework.web.filter.CharacterEncodingFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">encoding</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">UTF-8</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">forceEncoding</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">true</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">hibernateOpenSessionInViewFilterContent</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springside.modules.orm.hibernate.OpenSessionInViewFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">excludeSuffixs</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">js,css,jpg,gif</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">sessionFactoryBeanName</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">sessionFactoryContent</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">hibernateOpenSessionInViewFilterIndex</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springside.modules.orm.hibernate.OpenSessionInViewFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">excludeSuffixs</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">js,css,jpg,gif</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">sessionFactoryBeanName</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">sessionFactoryIndex</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">param-value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">init-param</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;SpringSecurity&nbsp;filter</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">springSecurityFilterChain</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springframework.web.filter.DelegatingFilterProxy</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Struts2&nbsp;filter&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">struts2Filter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">encodingFilter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/*</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">springSecurityFilterChain</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/*</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">hibernateOpenSessionInViewFilterContent</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/*</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">hibernateOpenSessionInViewFilterIndex</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/*</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">struts2Filter</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-name</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/*</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">url-pattern</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">filter-mapping</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">Spring的ApplicationContext&nbsp;载入&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springframework.web.context.ContextLoaderListener</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Spring&nbsp;刷新Introspector防止内存泄露&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.springframework.web.util.IntrospectorCleanupListener</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">listener-class</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">listener</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;session超时定义,单位为分钟&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">session-config</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">session-timeout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">20</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">session-timeout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">session-config</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;出错页面定义&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">exception-type</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">java.lang.Throwable</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">exception-type</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/common/500.jsp</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">500</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/common/500.jsp</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">404</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/common/404.jsp</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">403</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-code</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">/common/403.jsp</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">location</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">error-page</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">web-app</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
<br>
5、由于项目中有多个SessionFactory，所以编写Dao层的时候需要使用@Resource注解来明确指定使用哪一个
SessionFactory，如下面代码所示，ArticleDao使用sessionFactoryContent，而
ArticleIndexDao使用sessionFactoryIndex：
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);">&nbsp;cn.puretext.dao;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;javax.annotation.Resource;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.hibernate.SessionFactory;<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.springframework.stereotype.Repository;<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.springside.modules.orm.hibernate.HibernateDao;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;cn.puretext.entity.web.Article;<br>
<br>
@Repository<br>
</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;ArticleDao&nbsp;</span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);">&nbsp;HibernateDao</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">Article,&nbsp;Long</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;{<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;@Override<br>
&nbsp;&nbsp;&nbsp;&nbsp;@Resource(name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">sessionFactoryContent</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;setSessionFactory(SessionFactory&nbsp;sessionFactory)&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;TODO&nbsp;Auto-generated&nbsp;method&nbsp;stub</span><span style="color: rgb(0, 128, 0);"><br>
</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">super</span><span style="color: rgb(0, 0, 0);">.setSessionFactory(sessionFactory);<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
<br>
}</span></div>
<br>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);">&nbsp;cn.puretext.dao;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;javax.annotation.Resource;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.hibernate.SessionFactory;<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.springframework.stereotype.Repository;<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;org.springside.modules.orm.hibernate.HibernateDao;<br>
<br>
</span><span style="color: rgb(0, 0, 255);">import</span><span style="color: rgb(0, 0, 0);">&nbsp;cn.puretext.entity.web.ArticleIndex;<br>
<br>
@Repository<br>
</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;ArticleIndexDao&nbsp;</span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);">&nbsp;HibernateDao</span><span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">ArticleIndex,&nbsp;Long</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;@Override<br>
&nbsp;&nbsp;&nbsp;&nbsp;@Resource(name&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">sessionFactoryIndex</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;setSessionFactory(SessionFactory&nbsp;sessionFactory)&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">&nbsp;TODO&nbsp;Auto-generated&nbsp;method&nbsp;stub</span><span style="color: rgb(0, 128, 0);"><br>
</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">super</span><span style="color: rgb(0, 0, 0);">.setSessionFactory(sessionFactory);<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
}<br>
</span></div>
<br>
6、在GlassFish中部署项目，部署项目的时候依然使用前面提到的GlassFish的管理界面，这里不赘述。<br>
<br>经过以上六步，就可以成功的在基于SpringSide
3的项目中使用多个数据库。如果你确实很不相使用GlassFish，而对Tomcat情有独钟的话，就要使用我前面提到的“提供JTA功能的其它组件”
了。在这里，我推荐使用Atomikos，这是一个很优秀的JTA实现，它的官方网站为<a href="http://www.atomikos.com/">www.atomikos.com</a>，它提供开源版和商业版，下面是从其官方网站上截取的图片：<br>
<img alt="" src="286916_files/002.PNG" border="0"><br>
<br>
很烦人的是，该网站不直接提供下载地址，如果要下载，就必须先填写姓名邮箱和电话，如果大家不想填写这些信息，可以直接进入这个网址下载<a href="http://www.atomikos.com/Main/InstallingTransactionsEssentials">http://www.atomikos.com/Main/InstallingTransactionsEssentials</a>，我选择的是3.5.5版。<br>
<br>
方法二、使用Tomcat服务器和Atomikos<br>
<br>
1、将Atomikos整合到Tomcat服务器中，其步骤可以参考Atomikos的文档，如下：<br>
<a href="http://www.atomikos.com/Documentation/Tomcat6Integration33">http://www.atomikos.com/Documentation/Tomcat6Integration33</a><br>
<br>
2、在Tomcat中配置JNDI数据源，方法是修改Tomcat的content.xml文件，在文件中加入如下两个&lt;Resource/&gt;和一个&lt;Transaction/&gt;：
<p>&nbsp;</p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">Transaction&nbsp;</span><span style="color: rgb(255, 0, 0);">factory</span><span style="color: rgb(0, 0, 255);">="com.atomikos.icatch.jta.UserTransactionFactory"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">Resource&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="jdbc/dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;auth</span><span style="color: rgb(0, 0, 255);">="Container"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type</span><span style="color: rgb(0, 0, 255);">="com.atomikos.jdbc.AtomikosDataSourceBean"</span><span style="color: rgb(255, 0, 0);">&nbsp;factory</span><span style="color: rgb(0, 0, 255);">="com.atomikos.tomcat.BeanFactory"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniqueResourceName</span><span style="color: rgb(0, 0, 255);">="jdbc/myDB"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaDataSourceClassName</span><span style="color: rgb(0, 0, 255);">="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.databaseName</span><span style="color: rgb(0, 0, 255);">="puretext"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.serverName</span><span style="color: rgb(0, 0, 255);">="localhost"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.port</span><span style="color: rgb(0, 0, 255);">="3306"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.user</span><span style="color: rgb(0, 0, 255);">="USER"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.password</span><span style="color: rgb(0, 0, 255);">="PASSWORD"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.url</span><span style="color: rgb(0, 0, 255);">="jdbc:mysql://localhost:3306/puretext"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">Resource&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="jdbc/dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;auth</span><span style="color: rgb(0, 0, 255);">="Container"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type</span><span style="color: rgb(0, 0, 255);">="com.atomikos.jdbc.AtomikosDataSourceBean"</span><span style="color: rgb(255, 0, 0);">&nbsp;factory</span><span style="color: rgb(0, 0, 255);">="com.atomikos.tomcat.BeanFactory"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniqueResourceName</span><span style="color: rgb(0, 0, 255);">="jdbc/myDB"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaDataSourceClassName</span><span style="color: rgb(0, 0, 255);">="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.databaseName</span><span style="color: rgb(0, 0, 255);">="puretext_index"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.serverName</span><span style="color: rgb(0, 0, 255);">="localhost"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.port</span><span style="color: rgb(0, 0, 255);">="3306"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.user</span><span style="color: rgb(0, 0, 255);">="USER"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xaProperties.password</span><span style="color: rgb(0, 0, 255);">="PASSWORD"</span><span style="color: rgb(255, 0, 0);">&nbsp;xaProperties.url</span><span style="color: rgb(0, 0, 255);">="jdbc:mysql://localhost:3306/puretext_index"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span></div>
<p>剩下的四步就和使用GlassFish的第3、4、5、6步一模一样了，这里不赘述。<br>
<br>
以上Atomikos和Tomcat的整合方案有时候或多或少出现一点问题，这些问题基本上都和JNDI有关，我想可能是Tomcat实现的JNDI配置
有问题。如果出现这样的问题无法解决的话，还有第三种方案，那就是直接在Spring的配置文件中配置Atomikos的JTA相关组件。<br>
<br>
方法三、直接在Spring的配置文件中配置Atomikos的JTA相关组件<br>
<br>
1、将下载的Atomikos中的jta.properties拷贝到项目的classpath中，将Atomikos的相关jar文件拷贝到项目的classpath中。<br>
<br>
2、在项目的applicationContext.xml文件中配置JTA的相关组件，配置文件如下：</p>
<p>&nbsp;</p>
<div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"><span style="color: rgb(0, 0, 255);">&lt;?</span><span style="color: rgb(255, 0, 255);">xml&nbsp;version="1.0"&nbsp;encoding="UTF-8"</span><span style="color: rgb(0, 0, 255);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br>
</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">beans&nbsp;</span><span style="color: rgb(255, 0, 0);">xmlns</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns:xsi</span><span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;xmlns:jee</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/jee"</span><span style="color: rgb(255, 0, 0);">&nbsp;xmlns:tx</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/tx"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;xmlns:context</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/context"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;xsi:schemaLocation</span><span style="color: rgb(0, 0, 255);">="http://www.springframework.org/schema/beans&nbsp;http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&nbsp;http://www.springframework.org/schema/tx&nbsp;http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&nbsp;http://www.springframework.org/schema/jee&nbsp;http://www.springframework.org/schema/jee/spring-jee-2.5.xsd&nbsp;http://www.springframework.org/schema/context&nbsp;http://www.springframework.org/schema/context/spring-context-2.5.xsd"</span><span style="color: rgb(255, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;default-lazy-init</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">description</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">Spring公共配置文件&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">description</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;定义受环境影响易变的变量&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="systemPropertiesModeName"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="SYSTEM_PROPERTIES_MODE_OVERRIDE"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="ignoreResourceNotFound"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="locations"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">list</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;标准配置&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">classpath*:/application.properties</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">list</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;使用annotation&nbsp;自动注册bean,并保证@Required,@Autowired的属性被注入&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">context:component-scan&nbsp;</span><span style="color: rgb(255, 0, 0);">base-package</span><span style="color: rgb(0, 0, 255);">="cn.puretext"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="com.atomikos.jdbc.AtomikosDataSourceBean"</span><span style="color: rgb(255, 0, 0);">&nbsp;init-method</span><span style="color: rgb(0, 0, 255);">="init"</span><span style="color: rgb(255, 0, 0);">&nbsp;destroy-method</span><span style="color: rgb(0, 0, 255);">="close"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="uniqueResourceName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">jdbc/dataSourceContent</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="xaDataSourceClassName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="xaProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="serverName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">localhost</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="portNumber"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">3306</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="databaseName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">puretext</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="user"</span><span style="color: rgb(0, 0, 255);">&gt;***</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="password"</span><span style="color: rgb(0, 0, 255);">&gt;***</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="poolSize"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="com.atomikos.jdbc.AtomikosDataSourceBean"</span><span style="color: rgb(255, 0, 0);">&nbsp;init-method</span><span style="color: rgb(0, 0, 255);">="init"</span><span style="color: rgb(255, 0, 0);">&nbsp;destroy-method</span><span style="color: rgb(0, 0, 255);">="close"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="uniqueResourceName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">jdbc/dataSourceIndex</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="xaDataSourceClassName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="xaProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="serverName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">localhost</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="portNumber"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">3306</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="databaseName"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">puretext_index</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="user"</span><span style="color: rgb(0, 0, 255);">&gt;***</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="password"</span><span style="color: rgb(0, 0, 255);">&gt;***</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="poolSize"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">3</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Hibernate配置&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="sessionFactoryContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="dataSource"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="dataSourceContent"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="namingStrategy"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.hibernate.cfg.ImprovedNamingStrategy"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="hibernateProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.dialect"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.dialect.MySQL5InnoDBDialect</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.show_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.show_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.format_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.format_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_class"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.cache.EhCacheProvider<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_configuration_file_resource_path"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.ehcache_config_file}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="packagesToScan"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="cn.puretext.entity.*"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="sessionFactoryIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="dataSource"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="dataSourceIndex"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="namingStrategy"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">class</span><span style="color: rgb(0, 0, 255);">="org.hibernate.cfg.ImprovedNamingStrategy"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="hibernateProperties"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.dialect"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.dialect.MySQL5InnoDBDialect</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.show_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.show_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.format_sql"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.format_sql}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_class"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">org.hibernate.cache.EhCacheProvider<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">prop&nbsp;</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="hibernate.cache.provider_configuration_file_resource_path"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">${hibernate.ehcache_config_file}</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">prop</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">props</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="packagesToScan"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="cn.puretext.entity.*"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;事务管理器配置,多数据源JTA事务</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="atomikosTransactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="com.atomikos.icatch.jta.UserTransactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;init-method</span><span style="color: rgb(0, 0, 255);">="init"</span><span style="color: rgb(255, 0, 0);">&nbsp;destroy-method</span><span style="color: rgb(0, 0, 255);">="close"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="forceShutdown"</span><span style="color: rgb(0, 0, 255);">&gt;&lt;</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">true</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">&gt;&lt;/</span><span style="color: rgb(128, 0, 0);">property</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="atomikosUserTransaction"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="com.atomikos.icatch.jta.UserTransactionImp"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="transactionTimeout"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="300"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bean&nbsp;</span><span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="transactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;class</span><span style="color: rgb(0, 0, 255);">="org.springframework.transaction.jta.JtaTransactionManager"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="transactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="atomikosTransactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">property&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="userTransaction"</span><span style="color: rgb(255, 0, 0);">&nbsp;ref</span><span style="color: rgb(0, 0, 255);">="atomikosUserTransaction"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">bean</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;使用annotation定义事务&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">tx:annotation-driven&nbsp;</span><span style="color: rgb(255, 0, 0);">transaction-manager</span><span style="color: rgb(0, 0, 255);">="transactionManager"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>
&nbsp;<br>
</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">beans</span><span style="color: rgb(0, 0, 255);">&gt;</span></div>
<p><br>
3、在web.xml中配置多个OpenSessionInViewFilter，其配置方法同前。<br>
<br>
4、在Dao类中使用@Resource指定使用哪一个sessionFactory。<br>
<br>
5、运行项目，成功。<br>
<br>
在以上的三个方法中，我强烈推荐第三种，因为该方法只需要将Atomikos的相关文件拷贝到项目的classpath中，并在
applicationContext.xml文件中完成配置即可，不需要修改应用服务器的任何文件，是非侵入性的，是最轻量级的，同时，也是配置起来最
容易成功的，在我的测试过程中基本上是一次成功，没有报错。<br>
<br>
好了，就写到这里了，希望SpringSide的fans们少走弯路，天天开心。</p>
</div>
	</div>
	<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('AjaxHolder$scriptmanager1', document.getElementById('Form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tAjaxHolder$UpdatePanel1'], [], [], 90);
//]]>
</script>

<div id="AjaxHolder_UpdatePanel1">
	    
    <a name="pagedcomment"></a>
<br>
<h3>评论</h3>
	
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#287080">#</a>&nbsp;<a name="287080"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("qzoo")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=qzoo" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl00_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl00$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl00_EditLink"></a>
					</h2>
					2009-07-17 09:35 by <a id="AjaxHolder_Comments_CommentList_ctl00_NameLink" target="_blank">qzoo</a>
				</div>
				<div class="postbody">不知道前辈能不能帮忙解答一下这个问题，万分感谢。
<br><a href="http://forum.springside.org.cn/viewthread.php?tid=3850" target="_new" rel="nofollow">http://forum.springside.org.cn/viewthread.php?tid=3850</a></div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#287671">#</a>&nbsp;<a name="287671"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("虎啸龙吟")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e8%99%8e%e5%95%b8%e9%be%99%e5%90%9f" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl01_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl01$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl01_EditLink"></a>
					</h2>
					2009-07-21 16:30 by <a id="AjaxHolder_Comments_CommentList_ctl01_NameLink" href="http://www.blogjava.net/crabboy/" target="_blank">虎啸龙吟</a>
				</div>
				<div class="postbody">把源码提供给我，好？</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#287774">#</a>&nbsp;<a name="287774"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("海边沫沫")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e6%b5%b7%e8%be%b9%e6%b2%ab%e6%b2%ab" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl02_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl02$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl02_EditLink"></a>
					</h2>
					2009-07-21 21:14 by <a id="AjaxHolder_Comments_CommentList_ctl02_NameLink" href="http://www.blogjava.net/youxia/" target="_blank">海边沫沫</a>
				</div>
				<div class="postbody">@虎啸龙吟
<br>过两天我会提供下载</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#288375">#</a>&nbsp;<a name="288375"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("虎啸龙吟")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e8%99%8e%e5%95%b8%e9%be%99%e5%90%9f" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl03_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl03$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl03_EditLink"></a>
					</h2>
					2009-07-25 19:36 by <a id="AjaxHolder_Comments_CommentList_ctl03_NameLink" href="http://www.blogjava.net/crabboy/" target="_blank">虎啸龙吟</a>
				</div>
				<div class="postbody">博主：<br>如果有三个或三个以上的数据源怎么办？<br>&lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"&gt;<br>        &lt;property name="transactionManager" ref="atomikosTransactionManager" /&gt;<br>        &lt;property name="userTransaction" ref="atomikosUserTransaction"/&gt;<br>    &lt;/bean&gt;<br>怎么写？</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法[未登录]" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#288379">#</a>&nbsp;<a name="288379"></a>re: 在SpringSide 3 中使用多个数据库的方法[未登录]&nbsp;&nbsp;<a onclick='return SetReplyAuhor("海边沫沫")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e6%b5%b7%e8%be%b9%e6%b2%ab%e6%b2%ab" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl04_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl04$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl04_EditLink"></a>
					</h2>
					2009-07-25 20:21 by <a id="AjaxHolder_Comments_CommentList_ctl04_NameLink" href="http://www.blogjava.net/youxia" target="_blank">海边沫沫</a>
				</div>
				<div class="postbody">这几行不需要任何变动，只需要多配置几个数据源就可以了。</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#288859">#</a>&nbsp;<a name="288859"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("xfan")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=xfan" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl05_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl05$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl05_EditLink"></a>
					</h2>
					2009-07-29 11:16 by <a id="AjaxHolder_Comments_CommentList_ctl05_NameLink" target="_blank">xfan</a>
				</div>
				<div class="postbody">为什么不用虚拟数据源</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#288939">#</a>&nbsp;<a name="288939"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("海边沫沫")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e6%b5%b7%e8%be%b9%e6%b2%ab%e6%b2%ab" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl06_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl06$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl06_EditLink"></a>
					</h2>
					2009-07-29 18:18 by <a id="AjaxHolder_Comments_CommentList_ctl06_NameLink" href="http://www.blogjava.net/youxia/" target="_blank">海边沫沫</a>
				</div>
				<div class="postbody">@xfan
<br>虚拟数据源也不错，不过我是最近看BlogJava上的一篇文章（http://www.blogjava.net/Werther/archive/2009/07/27/288643.html）才知道有这个东西。
<br>所以说我要学习的东西还有很多。</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#292708">#</a>&nbsp;<a name="292708"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("石上清泉")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e7%9f%b3%e4%b8%8a%e6%b8%85%e6%b3%89" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl07_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl07$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl07_EditLink"></a>
					</h2>
					2009-08-26 19:20 by <a id="AjaxHolder_Comments_CommentList_ctl07_NameLink" target="_blank">石上清泉</a>
				</div>
				<div class="postbody">请问博主，按照方法3的配置，是否依赖于web服务器，我用3的配置，然后做测试，总是提示Could not find UserTransaction in JNDI,请问用atomikos，怎么才能不依赖web容器运行？谢谢。</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#292866">#</a>&nbsp;<a name="292866"></a>re: 在SpringSide 3 中使用多个数据库的方法&nbsp;&nbsp;<a onclick='return SetReplyAuhor("海边沫沫")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=%e6%b5%b7%e8%be%b9%e6%b2%ab%e6%b2%ab" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl08_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl08$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl08_EditLink"></a>
					</h2>
					2009-08-27 19:13 by <a id="AjaxHolder_Comments_CommentList_ctl08_NameLink" href="http://www.blogjava.net/youxia/" target="_blank">海边沫沫</a>
				</div>
				<div class="postbody">@石上清泉
<br>使用方法三，是不需要和JNDI打交道的，dataSource、userTransaction和transactionManager都是在Spring的配置文件中配置的，本来就不依赖于服务器。
<br>
<br>方法二倒是老出错。</div>
			</div>
		
			<div class="post">
				<div class="posthead">
					<h2>
						<a title="permalink: re: 在SpringSide 3 中使用多个数据库的方法" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#295764">#</a>&nbsp;<a name="295764"></a>re: 在SpringSide 3 中使用多个数据库的方法<a name="Post"></a>&nbsp;&nbsp;<a onclick='return SetReplyAuhor("sw")' href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html#post">回复</a>&nbsp;&nbsp;<a title="查看该作者发表过的评论" href="http://www.blogjava.net/comment?author=sw" target="_blank">更多评论</a>
						<a id="AjaxHolder_Comments_CommentList_ctl09_DeleteLink" href="javascript:__doPostBack('AjaxHolder$Comments$CommentList$ctl09$DeleteLink','')"></a>&nbsp;&nbsp;<a id="AjaxHolder_Comments_CommentList_ctl09_EditLink"></a>
					</h2>
					2009-09-20 19:36 by <a id="AjaxHolder_Comments_CommentList_ctl09_NameLink" target="_blank">sw</a>
				</div>
				<div class="postbody">分布式事物的意义不大，都是尽量避免跨DB的事务。</div>
			</div>
		
<style>
td { font-size: 12px }
.commentTextBox 
{ 
    font-family : Verdana; 
    font-size: 13px;
 }
</style>
<!--Beging Temp Save-->
<style>.userData { BEHAVIOR: url(#default#userdata) }
	</style>
<div class="userData" id="CommentsPersistDiv"></div>

<script type="text/javascript">
function pageLoad()
{
    Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(handleInitializeRequest);
    //Sys.WebForms.PageRequestManager.getInstance().add_endRequest(handleEndRequest);
}

function handleInitializeRequest(sender, args)
{
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    var eid = args.get_postBackElement().id;
    if (eid.indexOf("DeleteLink")>0) 
    {
       args.get_postBackElement().innerHTML = "<font color='red'>正在删除...</font>";         
    }    
    else if (eid.indexOf("btnSubmit")>0) 
    {
       document.getElementById("AjaxHolder_PostComment_ltSubmitMsg").innerHTML="正在提交...";
       document.getElementById("AjaxHolder_PostComment_btnSubmit").disabled = true;       
    }   
    else if(eid.indexOf("refreshList")>0)
    {
        document.getElementById("AjaxHolder_PostComment_refreshList").innerHTML="<font color='red'>正在刷新...</font>";
    }
   
}	

function TempSave(ElementID)
{
	try
	{
	CommentsPersistDiv.setAttribute("CommentContent",document.getElementById(ElementID).value);
	CommentsPersistDiv.save("CommentXMLStore");
	}
	catch(ex)
	{
	}
	
}
function Restore(ElementID)
{
	CommentsPersistDiv.load("CommentXMLStore");
	document.getElementById(ElementID).value=CommentsPersistDiv.getAttribute("CommentContent");
}	
			
			
</script>
<!--Ene TempSave-->
<div id="divRefreshComments" style="text-align: right; margin-right: 10px; margin-bottom: 5px; font-size: 12px;"><a href="http://news.cnblogs.com/">IT新闻</a>&nbsp;&nbsp;<a href="http://www.blogjava.net/RequireRegister.aspx">新用户注册</a>&nbsp;&nbsp;<a id="AjaxHolder_PostComment_refreshList" href="javascript:__doPostBack('AjaxHolder$PostComment$refreshList','')">刷新评论列表</a>&nbsp;&nbsp;</div>
<div class="commentform">
<script type="text/javascript" src="286916_files/google_service.js">
</script>
<script type="text/javascript">
try{
  GS_googleAddAdSenseService("ca-pub-4210569241504288");
  GS_googleEnableAllServices();
  } catch (e) { }
</script><script src="286916_files/test_gam_domain.js"></script><script src="286916_files/google_ads.js"></script>
<script type="text/javascript">
try{
  GA_googleAddSlot("ca-pub-4210569241504288", "blogjava_commentbox_up");
  GA_googleAddSlot("ca-pub-4210569241504288", "blogjava_blogpost_bottom");
  GA_googleAddSlot("ca-pub-4210569241504288", "blogjava_blogpost_bottom1");
  } catch (e) { }
</script>
<script type="text/javascript">
try{
  GA_googleFetchAds();
  } catch (e) { }
</script>
<span id="AjaxHolder_PostComment_ltSubmitMsg" style="color: Red;"></span>
<br>
<a name="Feedback"></a>
	<table border="0" cellpadding="1" cellspacing="1">
		<tbody><tr>
			<td colspan="3" height="5"></td>
		</tr>
		<tr>
			<td width="75"></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td colspan="2">
			<a href="http://job.cnblogs.com/offer/1762/" target="_blank">沪江网诚聘Flash程序员</a>
			<!--<a href="http://news.cnblogs.com" target="_blank">看IT新闻, 上博客园新闻频道</a>-->
			</td>
		</tr>
		<tr>
			<td width="55">标题</td>
			<td><input name="AjaxHolder$PostComment$tbTitle" value="re: 在SpringSide 3 中使用多个数据库的方法" id="AjaxHolder_PostComment_tbTitle" class="commenttb" style="width: 320px;" type="text"></td>
			<td><span id="AjaxHolder_PostComment_RequiredFieldValidator1" style="color: Red; visibility: hidden;">请输入标题</span></td>
		</tr>
		<tr>
			<td>姓名</td>
			<td><input name="AjaxHolder$PostComment$tbName" id="AjaxHolder_PostComment_tbName" class="commenttb" style="width: 320px;" type="text"></td>
			<td><span id="AjaxHolder_PostComment_RequiredFieldValidator2" style="color: Red; visibility: hidden;">请输入你的姓名</span></td>
		</tr>
		<tr>
			<td>主页</td>
			<td><input name="AjaxHolder$PostComment$tbUrl" id="AjaxHolder_PostComment_tbUrl" class="commenttb" style="width: 320px;" type="text"></td>
			<td><font face="宋体"></font></td>
		</tr>
		<tr>
			<td colspan="3" align="left">
				<table id="AjaxHolder_PostComment_tbCaptchaImage" class="CommentForm" border="0" cellpadding="0" cellspacing="0">
		<tbody><tr>
			<td colspan="3">
							<span id="AjaxHolder_PostComment_Requiredfieldvalidator4" style="color: Red; display: none;">请输入验证码</span>
							<span id="AjaxHolder_PostComment_lblImage" style="color: Red; font-weight: bold;"></span>
						</td>
		</tr>
		<tr>
			<td width="78">验证码</td>
			<td><input name="AjaxHolder$PostComment$CodeNumberTextBox" id="AjaxHolder_PostComment_CodeNumberTextBox" type="text">*&nbsp;&nbsp;<img src="286916_files/JpegImage.jpeg"></td>
			<td align="left"></td>
		</tr>
	</tbody></table>
	
			</td>
		</tr>
		<tr>
			<td colspan="3">内容(请不要发表任何与政治相关的内容)
				<span id="AjaxHolder_PostComment_RequiredFieldValidator3" style="color: Red; visibility: hidden;">请输入评论内容</span><br>
				<textarea name="AjaxHolder$PostComment$tbComment" rows="10" cols="50" id="AjaxHolder_PostComment_tbComment" class="commentTextBox" onkeydown="ctlent(event,'AjaxHolder_PostComment_tbComment')" style="width: 480px; height: 220px;"></textarea></td>
		</tr>
		<tr>
			<td colspan="3">
		<span id="AjaxHolder_PostComment_Message" style="color: Red;"></span>
		</td>
		</tr><tr>
			<td colspan="3"><input id="AjaxHolder_PostComment_chkRemember" name="AjaxHolder$PostComment$chkRemember" checked="checked" tabindex="-1" type="checkbox"><label for="AjaxHolder_PostComment_chkRemember">Remember Me?</label></td>
		</tr>
		<tr>
			<td height="23"><input name="AjaxHolder$PostComment$btnSubmit" value="提交" onclick="TempSave('AjaxHolder_PostComment_tbComment');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;AjaxHolder$PostComment$btnSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="AjaxHolder_PostComment_btnSubmit" class="commentButton" type="submit">
				</td>
			<td colspan="2" height="23">&nbsp;
				<a id="AjaxHolder_PostComment_lnkLogin" href="http://www.blogjava.net/login.aspx?ReturnURL=http://www.blogjava.net/youxia/archive/2009/07/15/286916.html&amp;SourceURL=/youxia/archive/2009/07/15/286916.html">登录</a>&nbsp;&nbsp;<!--<a id="AjaxHolder_PostComment_linkLoginComment" OnClick="if(document.getElementById('AjaxHolder_PostComment_tbComment').value != '') return confirm('未提交的评论内容将会丢失, 你真的要进入高级评论吗?');" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html?login=1#Post">使用高级评论</a>&nbsp;&nbsp;<a href="http://www.blogjava.net/RequireRegister.aspx">新用户注册</a>&nbsp;&nbsp;<A href="#Top">返回页首</A>&nbsp;&nbsp;<a id="AjaxHolder_PostComment_lbRestore" OnClick="Restore('AjaxHolder_PostComment_tbComment'); return false;" href="/youxia/archive/2009/07/15/286916.html#Post">恢复上次提交</a>&nbsp;&nbsp;-->&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
		</tr>
		<tr>
			<td colspan="3"><label class="CtrlEnter">[使用Ctrl+Enter键可以直接提交]</label></td>
		</tr>
		<tr>
			<td colspan="3"><a href="http://kb.cnblogs.com/zt/windows7/" target="_blank"><span style="color: red;">Windows 7专题</span></a></td>
		</tr>
		<tr>
			<td colspan="3">该文被作者在 2009-07-18 17:18 编辑过</td>
		</tr>
		<!--
		<TR>
			<TD colSpan="3" height="5"></TD>
		</TR>	
		-->
		<tr>
		<td colspan="3">
		<div id="itnews_block">IT新闻：<br><a href="http://news.cnblogs.com/n/50303/" target="_blank">Symbian开放操作系统内核源代码EKA2</a><br><a href="http://news.cnblogs.com/n/50300/" target="_blank">扎克伯格：Facebook有黑客气质 差点错失域名</a><br><a href="http://news.cnblogs.com/n/50298/" target="_blank">商业周刊：中国视频行业盗版之争</a><br><a href="http://news.cnblogs.com/n/50297/" target="_blank">评论:Google 图书遭遇不明真相的群众</a><br><a href="http://news.cnblogs.com/n/50296/" target="_blank">迅雷COO谈起诉搜狐:与影视内容侵权无关</a><br></div>
		</td>
		</tr>
		<tr>
			<td colspan="3">
<script type="text/javascript">
try{
  GA_googleFillSlot("blogjava_blogpost_bottom1");
  } catch (e) { }
</script><script src="286916_files/ads"></script>
<br>
<script type="text/javascript">
try{
  GA_googleFillSlot("blogjava_blogpost_bottom");
  } catch (e) { }
</script><script src="286916_files/ads_002"></script><div id="google_ads_div_blogjava_blogpost_bottom">
<iframe style="border: 0pt none ;" marginheight="0" marginwidth="0" name="google_ads_iframe_blogjava_blogpost_bottom" id="google_ads_iframe_blogjava_blogpost_bottom" width="300" frameborder="0" height="250" scrolling="no"></iframe></div>
<script>GA_googleCreateDomIframe('google_ads_div_blogjava_blogpost_bottom' ,'blogjava_blogpost_bottom');</script>
<br></td>
		</tr>
		<tr>
			<td colspan="3" height="1">网站导航:<div id="blogsite">
			<a href="http://www.cnblogs.com/">博客园</a>&nbsp;&nbsp;
			<a href="http://news.cnblogs.com/">IT新闻</a>&nbsp;&nbsp;
			<a href="http://home.cnblogs.com/">个人主页</a>&nbsp;&nbsp;
			<a href="http://www.cnweblog.com/">博客生活</a>&nbsp;&nbsp;
			<a href="http://www.cnitblog.com/">IT博客网</a>&nbsp;&nbsp;
			<a href="http://www.cppblog.com/">C++博客</a>&nbsp;&nbsp;
			<a href="http://space.cnblogs.com/">博客园社区</a>
			<a href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html?opt=admin">管理</a>
			</div>
		</td>
		</tr>
		<tr>
			<td colspan="3" height="5">
<div id="divRelativePosts">
相关文章:
	
			<ul style="margin-top: 0px; padding-left: 0px;">
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl01_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/08/24/292421.html">在SpringSide 3 中使用JCaptcha</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl02_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/22/287839.html">使用SpringSide 3.1.4.3开发Web项目的全过程（下）</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl03_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/19/287376.html">使用SpringSide 3.1.4.3开发Web项目的全过程（中）</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl04_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/19/287366.html">使用SpringSide 3.1.4.3开发Web项目的全过程（上）</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside; display: none;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl05_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/15/286916.html">在SpringSide 3 中使用多个数据库的方法</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl06_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/12/286454.html">SpringSide 3 中的多数据源配置的问题</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl07_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/07/09/286165.html">SpringSide 3 中的数据库访问层</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl08_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2009/03/17/260326.html">使用Fedora 10 进行Java开发，发两张截图让大家尝尝鲜</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl09_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2008/12/24/248051.html">SpringSide 3 中的 Struts 2</a>
			</li>
		
			<li style="list-style-type: none; list-style-image: none; list-style-position: outside;">
				<a id="AjaxHolder_PostComment_ctl07_RelativePostsList_ctl10_Hyperlink1" href="http://www.blogjava.net/youxia/archive/2008/12/07/244883.html">SpringSide 3 中的安全框架</a>
			</li>
		
			</ul>
		
</div>
</td>
		</tr>	
		<tr>
			<td colspan="3">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="3" height="5"></td>
		</tr>
		<tr>
			<td colspan="3">
				
<br>
<br>
<iframe marginheight="0" marginwidth="0" src="286916_files/ad.htm" style="border: 0px solid rgb(102, 102, 102);" allowtransparency="true" width="468" frameborder="0" height="0" scrolling="no"></iframe>
<br>


</td>
		</tr>		
	</tbody></table>	
</div>
<div id="AjaxHolder_PostComment_ValidationSummary1" style="color: Red; display: none;">

	</div>

</div>

				
			</div>
		</td>
	</tr>
	<tr>
		<td colspan="2" class="FooterCell">
			
<p id="footer">
	Powered by: 
	<br>
	
	<a id="Footer1_Hyperlink3" name="Hyperlink1" href="http://www.blogjava.net/" style="font-family: Verdana; font-size: 12px;">BlogJava</a>
	<br>
	Copyright © 海边沫沫
</p>

		</td>
	</tr>
</tbody></table>
<div id="lefttemp" style="display: none;"></div>

    
<script type="text/javascript">
//<![CDATA[
var Page_ValidationSummaries =  new Array(document.getElementById("AjaxHolder_PostComment_ValidationSummary1"));
var Page_Validators =  new Array(document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator1"), document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator2"), document.getElementById("AjaxHolder_PostComment_Requiredfieldvalidator4"), document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator3"));
//]]>
</script>

<script type="text/javascript">
//<![CDATA[
var AjaxHolder_PostComment_RequiredFieldValidator1 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator1"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator1");
AjaxHolder_PostComment_RequiredFieldValidator1.controltovalidate = "AjaxHolder_PostComment_tbTitle";
AjaxHolder_PostComment_RequiredFieldValidator1.errormessage = "请输入标题";
AjaxHolder_PostComment_RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator1.initialvalue = "";
var AjaxHolder_PostComment_RequiredFieldValidator2 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator2"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator2");
AjaxHolder_PostComment_RequiredFieldValidator2.controltovalidate = "AjaxHolder_PostComment_tbName";
AjaxHolder_PostComment_RequiredFieldValidator2.errormessage = "请输入你的姓名";
AjaxHolder_PostComment_RequiredFieldValidator2.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator2.initialvalue = "";
var AjaxHolder_PostComment_Requiredfieldvalidator4 = document.all ? document.all["AjaxHolder_PostComment_Requiredfieldvalidator4"] : document.getElementById("AjaxHolder_PostComment_Requiredfieldvalidator4");
AjaxHolder_PostComment_Requiredfieldvalidator4.controltovalidate = "AjaxHolder_PostComment_CodeNumberTextBox";
AjaxHolder_PostComment_Requiredfieldvalidator4.errormessage = "请输入验证码";
AjaxHolder_PostComment_Requiredfieldvalidator4.display = "Dynamic";
AjaxHolder_PostComment_Requiredfieldvalidator4.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_Requiredfieldvalidator4.initialvalue = "";
var AjaxHolder_PostComment_RequiredFieldValidator3 = document.all ? document.all["AjaxHolder_PostComment_RequiredFieldValidator3"] : document.getElementById("AjaxHolder_PostComment_RequiredFieldValidator3");
AjaxHolder_PostComment_RequiredFieldValidator3.controltovalidate = "AjaxHolder_PostComment_tbComment";
AjaxHolder_PostComment_RequiredFieldValidator3.errormessage = "请输入评论内容";
AjaxHolder_PostComment_RequiredFieldValidator3.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
AjaxHolder_PostComment_RequiredFieldValidator3.initialvalue = "";
var AjaxHolder_PostComment_ValidationSummary1 = document.all ? document.all["AjaxHolder_PostComment_ValidationSummary1"] : document.getElementById("AjaxHolder_PostComment_ValidationSummary1");
AjaxHolder_PostComment_ValidationSummary1.showmessagebox = "True";
AjaxHolder_PostComment_ValidationSummary1.showsummary = "False";
//]]>
</script>


<script type="text/javascript">
//<![CDATA[

var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}

function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
        
document.getElementById('AjaxHolder_PostComment_ValidationSummary1').dispose = function() {
    Array.remove(Page_ValidationSummaries, document.getElementById('AjaxHolder_PostComment_ValidationSummary1'));
}
Sys.Application.initialize();

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator1').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator1'));
}

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator2').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator2'));
}

document.getElementById('AjaxHolder_PostComment_Requiredfieldvalidator4').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_Requiredfieldvalidator4'));
}

document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator3').dispose = function() {
    Array.remove(Page_Validators, document.getElementById('AjaxHolder_PostComment_RequiredFieldValidator3'));
}
//]]>
</script>
</form>
    <script type="text/javascript" src="286916_files/ShowHidden.js"></script>
	<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script><script src="286916_files/ga.js" type="text/javascript"></script>
	<script type="text/javascript">
	try {
	var pageTracker = _gat._getTracker("UA-476124-3");
	pageTracker._trackPageview();
	} catch(err) {}</script>
</body></html>